﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Class_Entity.ObjectTwo;

namespace DataAccess.ObjectOne
{
   public class D_FEEBACK
    {
        DataTable tb = new DataTable();
        FeedBack fx = new FeedBack();
        ConnectionToDataBase ex = new ConnectionToDataBase();
        public bool InsertFEEDBACK(FeedBack fb)
        {
            SqlParameter[] sqlParameters = new SqlParameter[4];
            sqlParameters[0] = new SqlParameter("@A", SqlDbType.VarChar);
            sqlParameters[0].Value = fb.FIRST_NAME;
            sqlParameters[1] = new SqlParameter("@B", SqlDbType.VarChar);
            sqlParameters[1].Value = fb.LAST_NAME;
            sqlParameters[2] = new SqlParameter("@C", SqlDbType.VarChar);
            sqlParameters[2].Value = fb.EMAIL;
            sqlParameters[3] = new SqlParameter("@D", SqlDbType.VarChar);
            sqlParameters[3].Value = fb.BODY;
            return ex.executeInserQuery("InsertFEEDBACK", sqlParameters);
        }
    }


}
